import java.util.LinkedList;

/**
 * @program: 1.17二叉树
 * @description:
 * @author: 李鑫月
 * @create: 2022-01-17 10:01
 **/
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        BTNode root=binaryTree.creatTree();
        BTNode root2=binaryTree.creatTree();
        binaryTree.preOrder4(root);
        binaryTree.inOrder4(root);
        binaryTree.postOrder4(root);
//        System.out.println("zzzzz");
//        binaryTree.preOrder(root);
//        System.out.println();
//        System.out.println(binaryTree.getSize1(root));
//        System.out.println(binaryTree.getSize(root));
//        System.out.println(binaryTree.getLeafSize1(root));
//        System.out.println(binaryTree.getLeafSize(root));
//        System.out.println("####################################");
//        System.out.println(binaryTree.getKLevelSize(root, 3));
//        System.out.println(binaryTree.getHeight(root));
//        System.out.println(binaryTree.find(root, 'C').val);
//        System.out.println(binaryTree.isCompleteTree1(root));
//        System.out.println("####################################");
//       BTNode node= binaryTree.mergeTrees(root,root2);
//        System.out.println("####################################");
//        binaryTree.levelOrder(root);
//        // test
//        LinkedList<BTNode> path = new LinkedList<>();
//        // get the path to node4
//        boolean hasPath = binaryTree.getPathToTarget(root, root.left.right.left, path);
//        if (hasPath) {
//            for (BTNode node1 : path) {
//                System.out.print(node.val + " ");
//            }
//        }
//        System.out.println();
//        System.out.println("============");
//        path.clear();

    }
}
